package com.codemonkey.lq.common.util;

import java.awt.Color;

public final class ColorUtils {
	/** 
	 * From http://panyongzheng.iteye.com/blog/1732648
	* @param c 例如 ff0000 六位的十六进制字符串表示红色 
	* @return java.awt.Color 对象的实例 
	*/  
	public static Color parseToColor(final String c) {
		Color convertedColor = Color.ORANGE;
		try {
			convertedColor = new Color(Integer.parseInt(c, 16));
		} catch (NumberFormatException e) {
			// codes to deal with this exception  
		}
		return convertedColor;
	}
}
